<?php
	include('include/configs.inc.php');
	
	if(!empty($_GET['search'])) {
		$code = $_GET['search'];
		$error = '';
		
		$sql = "SELECT description, b.id AS pid, p.url AS url FROM bien b INNER JOIN photo p ON b.id_photo=p.id WHERE b.zip_code='".$code."'";
		$query = $connect->query($sql);
		
		if($query->num_rows < 1) {
			$error = "Aucun r&eacute;sultat !";
		}
		
		include('template/Site_reservation.html');
	}
?>